<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="../css/base.css" />
<link rel="stylesheet" href="../css/util.css" />
<link rel="stylesheet" href="../css/index.css" />
<title>医美首页</title>
</head>
<body>
<!--头部-->
<div class="content_head">
	<div class="content_head_middle clearfix">
		<div class="left set_img_bg">
		</div>
		<p class="exit"><img src="../img/index/exit.png"/>退出</p>
		<p onclick="edit_pwd()">修改密码</p>
		<p class="hos_name" style="border-right: 1px solid black;">张婵</p>
	</div>
</div>
<div class="parent clearfix">
	<!--左边导航栏:医美-->
	<div class="content_left">
		<dl class="permis_mng dl_close" data_flag="close">
			<dt class=" flex_vertical" onclick="toBeautyAppoint(this)" style="border-radius: 10px !important;"><img src="../img/index/appoint.png"  style="position: relative;top: 0px;"/>预约管理</dt>
		</dl>
		<dl class="hos_mng dl_close" data_flag="close">
			<dt class=" flex_vertical"><img src="../img/index/dial.png" />订单管理</dt>
			<dd onclick="toAppointOrder(this)">订单列表</dd>
		</dl>
		<dl class="hos_mng dl_close" data_flag="close">
			<dt class=" flex_vertical"><img src="../img/index/comments.png" />项目管理</dt>
			<dd onclick="toSpecialProj(this)">特价项目</dd>
			<dd onclick="toAppointProj(this)">预约项目</dd>
			<dd onclick="toBeautyTyq(this)">体验券</dd>
		</dl>
		<dl class="hos_mng dl_close" data_flag="close">
			<dt class=" flex_vertical"><img src="../img/index/template.png" />信息管理</dt>
			<dd onclick="toBeautyTem(this)">模板管理</dd>
			<dd onclick="toBeautyEvaluate(this)">评价管理</dd>
		</dl>
		<!--<dl class="permis_mng dl_close" data_flag="close">
			<dt class=" flex_vertical" onclick="toBeautyIll(this)" style="border-radius: 10px !important;"><img src="../img/index/drafts.png" style="height: 27px;position: relative;top: 0px;margin: 0 18px;"/>疾病管理</dt>
		</dl>-->
		<!--<dl class="permis_mng dl_close" data_flag="close">
			<dt class=" flex_vertical" onclick="toBeautyAppoint(this)" style="border-radius: 10px !important;"><img src="../img/index/appoint.png"  style="position: relative;top: 0px;"/>预约管理</dt>
		</dl>-->
		<dl class="permis_mng dl_close" data_flag="close">
			<dt class=" flex_vertical" onclick="tobeautySpeedAppoint(this)" style="border-radius: 10px !important;"><img src="../img/index/friends.png"  style="position: relative;top: 3px;"/>便捷约定</dt>
		</dl>
		
		<!--<dl class="permis_mng dl_close" data_flag="close">
			<dt class=" flex_vertical" onclick="toBeautyEvaluate(this)" style="border-radius: 10px !important;"><img src="../img/index/friends.png"  style="position: relative;top: 3px;"/>评价管理</dt>
		</dl>-->
		<!--<dl class="permis_mng dl_close" data_flag="close">
			<dt class=" flex_vertical" onclick="toBeautyTyq(this)" style="border-radius: 10px !important;"><img src="../img/index/quan.png"  style="position: relative;top: 3px;"/>体验券</dt>
		</dl>-->
		<!--<dl class="permis_mng dl_close" data_flag="close">
			<dt class=" flex_vertical" onclick="toBeautyTem(this)" style="border-radius: 10px !important;"><img src="../img/index/template.png"  style="position: relative;top: 3px;"/>模板管理</dt>
		</dl>-->
	</div>
	<!--右边子页面-->
	<div class="content_right">
		<iframe id="child_content" name="iframe" scrolling="yes" src="beauty_appoint_list.html" style="width:985px;height: 100%;" charset="utf-8"></iframe>
	</div>
	
</div>
<!--遮罩层-->
<div class="shade none"></div>
<!--弹框-->
<div class="popup_box none">
	<p class="img_close clearfix">
		<img src="../img/close.png" onclick="close_box()"/>
	</p>
	<div>
		<div class="public_input">
			<span style="width: 120px;">原密码:</span>
			<input class="old_pwd" type="password" placeholder="原密码" style="width: 250px;"/>
		</div>
		<div class="public_input">
			<span style="width: 120px;">新密码:</span>
			<input class="new_pwd" type="password" placeholder="新密码" style="width: 250px;"/>
		</div>
		<div class="public_input">
			<span style="width: 120px;">确认密码:</span>
			<input class="confrim_pwd" type="password" placeholder="确认密码" style="width: 250px;"/>
		</div>
	</div>
	<p class="confirm" style="margin-left: 155px;width: 100px;">修 改</p>
</div>
<script type="text/javascript" src="../plug/jquery-1.11.3.js" ></script>
<script type="text/javascript" src="../js/util.js"></script>
<script type="text/javascript" src="../js/index.js" ></script>
<script type="text/javascript" src="../js/toggle.js" ></script>
<script>
//初始化医院名字
$(function(){
	var hosName = $.get_storage("hos_name");
	$(".hos_name").text(hosName);
});
//退出登录
$(".exit").click(function(){
//	alert("哈哈哈");
//	$.get(url+"/admin/logout",function(res){
//		
//	},"json");
	window.location.href="../login.html";
});
</script>
<script>
//修改密码
function edit_pwd(){
	$(".shade,.popup_box").show();
}
//验证
$(".confrim_pwd").blur(function(){
	if($(".new_pwd").val()){
		if($(".new_pwd").val()!=$(".confrim_pwd").val()){
			alert("前后密码不一致");
		}
	}
});

//修改
$(".confirm").click(function(){
	var old_pwd = $(".old_pwd").val();
	var new_pwd = $(".new_pwd").val();

	if(!$.verify(old_pwd,"原密码")){return false;}
	if(!$.verify(new_pwd,"新密码")){return false;}
	
	var data = {
		"password":old_pwd,
		"newPassword":new_pwd
	}
	$.post_ajax("/hospital/updatePassword",data,function(res){
		if(res.success==true){
			alert(res.data);
			window.location.href = "index.html";
		}else{
			alert(res.data);
		}
	});
});
</script>
<script>
//适应网页高度
$(function(){
	console.log($(window).height());
	$(".content_left").height($(window).height()-130);
	$(".content_right").height($(window).height()-100);
});
$(".content_left dt,.content_left dd").click(function(){
	//存储当前页面
	localPage();
});
//刷新定位到当前页面
if($.get_storage("emCurrUrl")){
	$("#child_content").attr("src",$.get_storage("emCurrUrl"));
}
//存储当前页面
function localPage(){
	var emCurrUrl = $("#child_content").attr("src");
//	console.log(emCurrUrl);
	window.localStorage.setItem("emCurrUrl",emCurrUrl);
}
</script>
</body>
</html>
